Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PDDL-based Goal Formulation Preconditions for the Decentral Agent #493

Draft
wants to merge 45 commits into
base: master
Choose a base branch
from

Conversation

snoato
Copy link
Contributor

@snoato snoato commented Nov 19, 2021

This PR relies on #312 in fawkesrobotics/fawkes

ISSUES gazsim-simtest causes performance issues that make it less likely for a build-test to pass.

Goal formulation on the decentralized agent so far relied on CLIPS rules that expressed preconditions on both domain and meta levels. For each class of goal, one or more rules were used. The domain-related preconditions expressed general executability in the context of the current world. Meta preconditions were used to cover anything from variable grounding to strategy decisions and priority management. This PR overhauls the formulation process using the new goal-class fact template and splits it into 3 distinct steps: goal-class creation, goal-class satisfaction checking, and goal-formulation.

  • goal-class creation: Goal-classes (on the level of simple goals) have been previously used in the CX to assign goal behavior in form of fixed-sequences. For each goal-class a few (in most cases just one) CLIPS rule served as a precondition for the formulation of a specific goal instance. The new goal-class facts try to encapsulate (sub-)instances of a potential goal-class. A goal-class fact for a certain goal-class is asserted when key (constant) variables can be filled. For example, the goal-class for DELIVER is asserted once for every incoming order. The order information provides the static information against which the formula can be evaluated. Thus, when a new goal-class fact of class DELIVER is created whenever a new order is received through the refbox. This, however, does not mean that the primary preconditions of the goal are satisfied, only that this is one possible general instance of the goal.
  • goal-class satisfaction checking: Each instance of a goal-class has a PDDL formula which expresses the executability check in terms of the world. The formula usually contains free variables to cover assignments which are not clear at the time of the goal-class assertion. One example is workpieces, as we do not usually know which workpiece will be used for an order at the time that we receive the order information. Free variables are grounded against the world and updated as the world is changed. A grounded formula is then continously evaluated against changes in the world.
  • goal-formulation: Once a precondition formula is satisfied, we can assume basic executability of the goal. Additional meta information is now collected (e.g. for priority management) and the goal is formulated using the meta and grounding information.

The PR enables the use of new reasoning techniques like promises on the level of PDDL satisfaction checking, since the general executability check of the goal is moved into PDDL. It also proves the technical feasability of using PDDL representations for goal preconditions and shows possible techniques to deal with the performance limitations posed by large and dynamic grounding spaces.

Open Questions:

  • Should the rules for goal-formulation be moved back into goal-production/split into a different file in general, as goal-class.clp is quite lengthy as it is.

@todo
Copy link

todo bot commented Nov 19, 2021

retract goal classes that are order dependend when they have been fulfilled

; TODO retract goal classes that are order dependend when they have been fulfilled
; and prevent reformulation to keep the fact base clean. This does not hurt performance
; for now.
; ------------------------- META CHECKS FOR GOALS -----------------------------------


This comment was generated by todo based on a TODO comment in 02c4715 in #493. cc @carologistics.

@snoato snoato force-pushed the dswoboda/pddl-based-goal-preconditions branch 2 times, most recently from 260ad9d to a4e4b2e Compare November 20, 2021 11:10
Enforce a more strict separation between preconditions that are necessary
for formulating a precondition formula for goal formulation (i.e. accessing
facts that hold information for a particular order, WP, etc.) and those
that are required for actual goal formulation (i.e. transient facts that
represent a world-state and need to be fulfilled to actually execute the
goal). The former are captured in the form of CLIPS LHS preconditions
before the goal-class for the corresponding goal is a asserted and serve
configuration purposes. The latter are enforced in the form of the
precondition formula that is continously evaluated, once asserted and
grounded, against the current state of the world-model.

The existing goal-class create and assert goals are updated accordingly.
Add the PDDL-based formulation precondition for the MOUNT-NEXT-RING goal.
To make the goal and precondition more reasonable it is split into 2 rules.
@snoato snoato force-pushed the dswoboda/pddl-based-goal-preconditions branch from 26c905b to 3a47d66 Compare November 22, 2021 11:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant